﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SixApp.Core;
using SixApp.Commmon;
using SixApp.Data;

namespace SixApp.Repositories
{
    public class BaseRepository
    {
        private static object sLockObj = new object();

        private static Access mDbConext;
        protected Access DbContext
        {
            get
            {
                if (mDbConext == null)
                {
                    lock (sLockObj)
                    {
                        if (mDbConext == null)
                        {
                            mDbConext = new Access(Config.ConnectionString);
                        }
                    }
                }

                return mDbConext;
            }
        }
    }
}
